package controllers.commands
{
	import com.adobe.utils.ArrayUtil;
	
	import controllers.commands.base.BaseCommand;
	
	import model.context.DeviceMonitorContext;
	import model.context.base.IContext;
	import model.vo.DeviceVOList;
	
	import mx.utils.ArrayUtil;
	
	import utils.ArrayListUtils;
	
	import view.panel.MultiDeviceMonitor;
	
	/**
	 * 更新设备
	 **/
	public class UpdateSelectedDevicesCommand extends BaseCommand
	{
		private var devContext:DeviceMonitorContext;
		public function UpdateSelectedDevicesCommand(context:IContext)
		{
			super();
			this.devContext = DeviceMonitorContext(context);
		}
		
		override public function execute():void {
			var deviceMonitorPanel:MultiDeviceMonitor = MultiDeviceMonitor(this.devContext.targetPanel);
			//将相关数据源带过去
			var dsList:Array = mx.utils.ArrayUtil.toArray( this.devContext.locInfoList );
			deviceMonitorPanel.setDataSource(dsList);	
		}
	}
}